package net.j4love.spring.mvc.ex.model;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Size;

/**
 * @author He Peng
 * @create 2017-06-29 17:21
 * @update 2017-06-29 17:21
 * @see
 */
public class Hobby {

    @NotBlank(message = "爱好描述不能为空")
    @Size(
            max = 20,
            message = "爱好描述不能超过20个字符"
    )
    private String description;

    public String getDescription() {
        return description;
    }

    public Hobby setDescription(String description) {
        this.description = description;
        return this;
    }

    @Override
    public String toString() {
        return "Hobby{" +
                "description='" + description + '\'' +
                '}';
    }
}
